#include <stdlib.h>
#include <stdbool.h>

typedef struct memory_pool_t memory_pool;

memory_pool * mempool_new(size_t num_entries, size_t entry_size);
void mempool_destroy(memory_pool * mp);

void * mempool_alloc(memory_pool * mp);
void mempool_free(memory_pool * mp, void * entry);

bool is_mempool_chunk(memory_pool * mp, void * entry);
bool is_mempool_exhaused(memory_pool * mp);
